<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:composite="http://java.sun.com/jsf/composite">

<!-- INTERFACE -->
<composite:interface>
	<ui:remove>
		<composite:attribute name="country" />
	</ui:remove>
</composite:interface>

<!-- IMPLEMENTATION: REUSABLE FOR CREATE AND UPDATE ACTIONS-->
<composite:implementation>

 
		[SOAP WEBSERVICE -->]  http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl<br />
	<br />
		http://vatid.eu/
		<br />
	<code>
		iso: DK<br /> vat: 30505166
	</code>
	<p />
			Please select your economic area. 			
		<p />


	<div class="pro_wrapper">
		<div class="pro_image_left">
		<rich:panel header="Panel with default Look-n-feel">
			<h:graphicImage library="images" name="maps/europe-blank.png" alt=""
				class="pro_image_style1" usemap="#selectionMap" >
			<map name="selectionMap" id="selectionMap">
				<area alt="UK" title="UK" href="javascript:void(0);"
					onclick="#{rich:component('isoCode')}.html('UK');"
					class="normaltip" shape="poly"
					coords="109,107,97,115,85,117,88,129,93,142,98,142,94,154,104,157,104,163,107,170,98,175,99,183,93,189,107,196,98,199,90,210,99,209,109,204,136,200,133,196,138,184,129,181,127,172,117,157,117,150,111,144,106,144,114,127,103,124" />
				<area alt="UK" title="UK" href="javascript:void(0);"
					class="normaltip" shape="poly"
					coords="80,153,75,158,78,164,80,161,84,164,90,160,87,152" />
				<area alt="FR" title="FR" href="javascript:void(0);"
					class="normaltip" shape="poly"
					coords="143,202,138,211,127,218,124,222,116,218,116,229,109,229,103,227,94,228,94,236,110,241,112,250,118,255,118,272,113,288,124,294,133,293,142,298,151,298,152,289,160,285,172,287,180,286,187,279,188,275,183,274,181,267,182,255,179,250,176,253,172,253,174,248,179,239,183,237,184,229,187,221,176,219,169,216,163,213,157,211,150,205" />
				<area alt="DE" title="DE" href="javascript:void(0);"
					class="normaltip" shape="poly"
					coords="186,158,189,166,185,169,175,170,176,178,174,182,176,184,171,190,170,200,171,205,172,210,174,217,188,221,185,235,189,237,197,235,203,237,208,235,226,231,224,225,231,217,225,214,218,208,215,201,232,190,237,191,232,184,225,172,224,169,225,161,214,158,204,161,193,157" />
				<area alt="CZ" title="CZ" href="javascript:void(0);"
					class="normaltip" shape="poly"
					coords="216,202,224,213,234,218,239,218,241,213,256,213,265,202,265,198,255,195,247,195,238,191,230,193,223,198" />
				<area alt="CH" title="CH" href="javascript:void(0);"
					onclick="#{rich:element('isoCode')}.innerHTML = 'CH';"
					class="normaltip" shape="poly"
					coords="185,237,178,242,173,252,179,251,183,254,187,254,192,250,197,252,200,249,205,249,208,250,208,247,210,243,206,241,203,238,198,236" />
				<area alt="BG" title="BG" href="javascript:void(0);"
					onclick="alert(#{rich:element('isoCode')}.innerHTML);"
					class="normaltip" shape="poly"
					coords="309,254,315,260,313,267,313,273,320,276,323,279,332,273,338,274,345,273,348,269,353,263,359,262,354,256,353,248,357,244,358,240,352,238,343,240,338,246,329,251,318,252" />
				<area alt="PL" title="PL" href="javascript:void(0);"
					class="normaltip" shape="poly"
					coords="223,160,226,164,226,171,231,180,237,189,248,194,257,195,266,199,267,202,273,202,280,198,292,198,293,193,297,177,294,172,291,164,288,161,290,153,285,149,281,140,271,143,259,145,255,148,247,144,241,146" />
				<area alt="HU" title="HU" href="javascript:void(0);"
					class="normaltip" shape="poly"
					coords="252,224,255,228,252,234,257,239,266,242,271,242,281,234,291,231,293,221,293,218,298,208,292,207,285,204,277,207,277,212,269,215,267,220,263,221,258,221" />
				<area alt="IT" title="IT" href="javascript:void(0);"
					class="normaltip" shape="poly"
					coords="184,255,182,264,183,272,188,276,188,279,199,272,210,276,217,288,231,297,248,304,253,306,258,310,262,312,269,322,267,333,260,333,256,337,247,336,240,338,243,342,262,349,266,346,262,341,264,336,270,332,273,327,273,323,277,321,276,316,271,315,272,305,277,304,286,309,286,303,281,300,263,294,263,290,256,292,244,285,239,276,227,268,226,262,224,257,232,252,234,249,234,241,228,241,224,239,219,239,214,242,210,242,211,246,209,251,201,251,200,253,194,252" />
			</map>
			</h:graphicImage>
			</rich:panel>
		</div>
		<div id="isoCodeDiv"></div>
		<p class="extra-wrap" id="countrySelection">
			<h:form id="supplierregistration_economicarea">
				<h6>Your economic parameters</h6>
				<dl class="listDescription">
					<dt>
						<a href="http://www.hostip.info"> <img
							src="http://api.hostip.info/flag.php" border="0"
							alt="IP Address Lookup" /></a> You headquarter is in
						<!-- <rich:inplaceInput id="isoCode" 
							value="#{countryController.iso2digitCountryCode}"
							style="text-transform:uppercase">
							<a4j:ajax event="keyup" execute="@form"
								render="country, currency" />
						</rich:inplaceInput>
						-->
						
						<h:outputText id="isoCode" value="#{countryController.iso2digitCountryCode}" />
						.
					</dt>
					<dd>
						<h:outputText id="country"
							value="#{countryController.country.countryName}" />
						belongs to the following economic areas:
					</dd>
					<dt>
						VAT rate
						<h:outputText id="vat" value="#{countryController.country.vat}" />
						%
					</dt>
					<dd>The value added tax (VAT) is added upon every product in
						almost any country.</dd>

					<dt>
						Currency
						<h:outputText id="currency"
							value="#{countryController.country.currency}" />
					</dt>
					<dd>The currency is required to transfer your credits to your
						account.</dd>

					Please verify your inputs are correctly.
				</dl>
			</h:form>
		</p>
	</div>

	<p />
	<dl class="pro_slide-down-box">
		<dt>Why do we need this information?</dt>
		<dd>From your country indication we derive values like VAT,
			country code, possible delivery options. These information sets
			prevents you from tedious and time consuming form registration.</dd>
	</dl>
	<p />
	<ui:remove>
	<h:panelGrid columns="3" border="1">

		<h:outputLabel for="countryCode" value="City:" />
		<h:inputText id="countryCode" value="#{cc.attrs.country.countryCode}">
			<rich:validator immediate="true" />
		</h:inputText>
		<rich:message for="countryCode" errorClass="invalid" />

		<h:outputLabel for="countryName" value="Country:" />
		<h:inputText id="countryName" value="#{cc.attrs.country.countryName}">
			<rich:validator immediate="true" />
		</h:inputText>
		<rich:message for="countryName" errorClass="invalid" />

		<h:outputLabel for="vat" value="VAT:" />
		<h:inputText id="vat" value="#{cc.attrs.vat.name}">
			<rich:validator immediate="true" />
		</h:inputText>
		<rich:message for="vat" errorClass="invalid" />

		<h:outputLabel for="currency" value="Currency:" />
		<h:inputText id="currency" value="#{cc.attrs.country.currency}">
			<rich:validator immediate="true" />
		</h:inputText>
		<rich:message for="currency" errorClass="invalid" />

		<h:outputLabel for="gmtZone" value="Time Zone:" />
		<h:inputText id="gmtZone" value="#{cc.attrs.country.gmtZone}">
			<rich:validator immediate="true" />
		</h:inputText>
		<rich:message for="gmtZone" errorClass="invalid" />

	</h:panelGrid>
	</ui:remove>
 

</composite:implementation>
</html>